<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStoragesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('storages', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',50)->default('')->comment('仓库名称');
            $table->string('description')->default('')->comment('描述');
            $table->tinyInteger('status')->unsigned()->default(1)->comment('状态，0-停用，1-启用');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `storages` comment '仓库表'");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('storages');
    }
}
